<template>
	<view :data-theme="theme">
		<view class="header">
			<view style="font-weight: bold;font-size: 18px;">
				{{this.detailData.name}}
			</view>
			<view class="header-time">
				<span>创建时间：{{this.detailData.creatTime}}</span>
			</view>
			<view>{{this.detailData.detail}}</view>
		</view>
	</view>
</template>

<script>
	import {
		detailPlatformRuleApi
	} from '@/api/platformRule.js';
	import {
		setThemeColor
	} from '../../../utils/setTheme';
	let app = getApp();
	export default {
		data() {
			return {
				bgColor: "#ffffff",
				theme: app.globalData.theme,
				detailId:'',
				detailData:{},
			};
		},
		onLoad(row) {
			this.detailId  = row.id;
			this.bgColor = setThemeColor();
			uni.setNavigationBarColor({
				frontColor: '#ffffff',
				backgroundColor: this.bgColor,
			});
			this.getDetail();
		},
		methods:{
			getDetail(){
				detailPlatformRuleApi({id:this.detailId}).then((res) => {
					this.detailData = res.data;
				});
			}
		},
	}
</script>

<style lang="scss">
	.bg_color {
		@include main_bg_color(theme);
	}
	
	.header{
		margin: 10px 10px 0 10px;
	}
	
	.header-time{
		margin: 10px 0;
		@include main_color(theme);
	}
</style>